angular.module('security.regist', [])
.factory('regist', ['$http', '$q', '$location', function($http, $q, $location) {
	return {
		registUser : function (formData) {
			var delay = $q.defer();
			//$http.post('/regist/regist.ajax', formData).success(function(data) {
			$http.post('/public/regist/regist.ajax', formData).success(function(data) {
		    	delay.resolve(data);
		    }).error(function (data) {
		    	delay.reject(data);
		    });
			return delay.promise;
		}
	};
}]);